import java.util.Scanner;

/**
 * @author Administrator
 * 猜数字
 */
public class Task02_14 {
    public static void main(String[] args) {
        int x= (int) (Math.random()*10)+1;
        System.out.println("随机数已经产生！请猜数字吧：");
        Scanner sc=new Scanner(System.in);
        int num=sc.nextInt();
        while(x!=num){
            if(num>x){
                System.out.println("猜大了");

            }else{
                System.out.println("猜小了");
               /* System.out.println("继续猜把：");*/
                /*Scanner sr =new Scanner(System.in);
                num=sr.nextInt();*/
            }
            System.out.println("继续猜把：");
            num=sc.nextInt();
        }
        System.out.println("恭喜你，猜对了！");
    }
}
